<!DOCTYPE html>
<html lang="zh">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

    <title>搜索页面</title>

    <link href="../AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css"/>
    <link href="../AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css"/>

    <link href="../basic/css/demo.css" rel="stylesheet" type="text/css"/>

    <link href="../css/seastyle.css" rel="stylesheet" type="text/css"/>

    <script type="text/javascript" src="../basic/js/jquery-1.7.min.js"></script>
    <script type="text/javascript" src="../js/script.js"></script>
</head>

<body>

<!--顶部导航条 -->
<div class="am-container header">
    <ul class="message-l">
        <div class="topMessage login-user">
            <div class="menu-hd login-info">
                <a href="login.html" target="_top" class="h">亲，请登录</a>
                <a href="register.html" target="_top">免费注册</a>
            </div>
            <div class="user-data" hidden>
                <img class="nick-avatar my-avatar" src="../images/2.jpg" alt="" style="width: 50px;" height="50px"/>
                <span class="nick-name"> WQ </span>
                <button class="logout-btn am-btn"> 注销</button>
            </div>
        </div>
    </ul>
    <ul class="message-r">
        <div class="topMessage home">
            <div class="menu-hd"><a href="home.html" target="_top" class="h">商城首页</a></div>
        </div>
        <div class="topMessage my-shangcheng">
            <div class="menu-hd MyShangcheng"><a href="#" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a>
            </div>
        </div>
        <div class="topMessage mini-cart">
            <div class="menu-hd"><a id="mc-menu-hd" href="#" target="_top"><i
                    class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong id="J_MiniCartNum"
                                                                                          class="h">0</strong></a></div>
        </div>
        <div class="topMessage favorite">
            <div class="menu-hd"><a href="#" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a>
            </div>
        </div>
    </ul>
</div>

<!--悬浮搜索框-->

<div class="nav white">

    <div class="logoBig">
        <li><img src="../picture/logo1.png"/></li>
    </div>

    <div class="search-bar pr">
        <a name="index_none_header_sysc" href="#"></a>
        <form onsubmit="return false;">
            <input id="searchInput" class="sku-search-input" name="index_none_header_sysc" type="text" placeholder="小米8"
                   autocomplete="off">
            <input id="ai-topsearch" class="submit am-btn sku-search-btn" value="搜索" tabindex="1" autofocus
                   type="submit">
        </form>
    </div>
</div>

<div class="clear"></div>
<b class="line"></b>
<div class="search">
    <div class="search-list">
        <div class="nav-table">
            <div class="long-title"><span class="all-goods">所有分类</span></div>
            <div class="nav-cont">
                <ul>
                    <li class="index"><a href="home.html">首页</a></li>
                    <li class="qc"><a href="#">闪租</a></li>
                    <li class="qc"><a href="#">限时抢</a></li>
                    <li class="qc"><a href="#">团租</a></li>
                    <li class="qc"><a href="#">大包装</a></li>
                </ul>
                <div class="nav-extra">
                    <i class="am-icon-user-secret am-icon-md nav-user"></i><b></b>我的福利
                    <i class="am-icon-angle-right" style="padding-left: 10px;"></i>
                </div>
            </div>
        </div>


        <div class="am-g am-g-fixed">
            <div class="am-u-sm-12 am-u-md-12">
                <div class="theme-popover">
                    <div class="searchAbout">
                        <span class="font-pale"> 共：</span>
                        <span class="ware-count">1213</span>
                        <span class="font-pale"> 件</span>

                    </div>
                    <div class="searchAbout">
                        <span class="font-pale">相关搜索：</span>
                        <a title="坚果" href="#">电脑</a>
                        <a title="瓜子" href="#">手机壳</a>
                        <a title="鸡腿" href="#">手机膜</a>

                    </div>
                    <ul class="select" hidden>
                        <p class="title font-normal">
                            <span class="fl">手机</span>
                            <span class="total fl">搜索到<strong class="num">997</strong>件相关商品</span>
                        </p>
                        <div class="clear"></div>
                        <li class="select-result">
                            <dl>
                                <dt>已选</dt>
                                <dd class="select-no"></dd>
                                <p class="eliminateCriteria">清除</p>
                            </dl>
                        </li>
                        <div class="clear"></div>
                        <li class="select-list">
                            <dl id="select1">
                                <dt class="am-badge am-round">品牌</dt>

                                <div class="dd-conent">
                                    <dd class="select-all selected"><a href="#">全部</a></dd>
                                    <dd><a href="#">索尼</a></dd>
                                    <dd><a href="#">OPPO</a></dd>
                                    <dd><a href="#">VIVO</a></dd>
                                    <dd><a href="#">华为</a></dd>
                                    <dd><a href="#">小米</a></dd>
                                    <dd><a href="#">苹果</a></dd>
                                    <dd><a href="#">三星</a></dd>
                                    <dd><a href="#">魅族</a></dd>
                                    <dd><a href="#">酷派</a></dd>
                                    <dd><a href="#">中兴</a></dd>
                                    <dd><a href="#">荣耀</a></dd>
                                    <dd><a href="#">美图</a></dd>
                                </div>

                            </dl>
                        </li>
                        <li class="select-list">
                            <dl id="select2">
                                <dt class="am-badge am-round">尺寸</dt>
                                <div class="dd-conent">
                                    <dd class="select-all selected"><a href="#">全部</a></dd>
                                    <dd><a href="#">3.5英寸以下</a></dd>
                                    <dd><a href="#">3.6-4.5英寸</a></dd>
                                    <dd><a href="#">4.6-5.0英寸</a></dd>
                                    <dd><a href="#">5.0-5.5英寸</a></dd>
                                    <dd><a href="#">5.6-6.0英寸</a></dd>

                                </div>
                            </dl>
                        </li>
                        <li class="select-list">
                            <dl id="select5">
                                <dt class="am-badge am-round">网络类型</dt>
                                <div class="dd-conent">
                                    <dd class="select-all selected"><a href="#">全部</a></dd>
                                    <dd><a href="#">移动4G/联通4G/电信4G</a></dd>
                                    <dd><a href="#">联通4G</a></dd>
                                    <dd><a href="#">移动4G</a></dd>
                                    <dd><a href="#">电信4G</a></dd>
                                    <dd><a href="#">电信3G</a></dd>
                                    <dd><a href="#">移动3G</a></dd>
                                </div>
                            </dl>
                        </li>
                        <li class="select-list">
                            <dl id="select3">
                                <dt class="am-badge am-round">操作系统</dt>
                                <div class="dd-conent">
                                    <dd class="select-all selected"><a href="#">全部</a></dd>
                                    <dd><a href="#">Android/安卓</a></dd>
                                    <dd><a href="#">iOS</a></dd>
                                    <dd><a href="#">无操作系统</a></dd>
                                    <dd><a href="#">MTK</a></dd>
                                    <dd><a href="#">阿里手机系统</a></dd>
                                    <dd><a href="#">Nucleus</a></dd>
                                </div>
                            </dl>
                        </li>

                    </ul>
                    <div class="clear"></div>
                </div>
                <div class="search-content">
                    <div class="sort sku-sort-list">
                        <li class="first"><a class="sku-sort-none" href="javascript: void(0)" title="综合">综合排序</a></li>
                        <li><a class="sku-sort" data-sort="1" href="javascript: void(0)" title="销量">销量排序</a></li>
                        <li><a class="sku-sort" data-sort="3" href="javascript: void(0)" title="价格">价格从低到高</a></li>
                        <li><a class="sku-sort" data-sort="2" href="javascript: void(0)" title="价格">价格从高到低</a></li>
                        <li class="big"><a class="sku-sort" data-sort="5" href="javascript: void(0)" title="新品">新品</a>
                        </li>
                    </div>
                    <div class="clear"></div>

                    <ul class="am-avg-sm-2 am-avg-md-3 am-avg-lg-4 boxes sku-list">
                        <li>
                            <div class="i-pic limit">
                                <img src="../picture/1.png"/>
                                <p class="title fl">OPPO A7 Hyper Boost加速引擎，超长续航，AI智慧美颜</p>
                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>1599</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>13156</span>
                                </p>
                            </div>
                        </li>
                        <li>
                            <div class="i-pic limit">

                                <img src="../picture/2.jpg"/>
                                <p class="title fl">苹果 iPhone Xs Max 先进的面容ID， 突破性的双镜头系统 </p>
                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>8689</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>6783</span>
                                </p>
                            </div>
                        </li>
                        <li>
                            <div class="i-pic limit">

                                <img src="../picture/3.jpg"/>
                                <p class="title fl">华为 nova 3 3D炫彩机身， 2400万高清四摄</p>
                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>2199</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>1110</span>
                                </p>
                            </div>
                        </li>
                        <li>
                            <div class="i-pic limit">

                                <img src="../picture/4.jpg"/>
                                <p class="title fl">【领券低至2099元】华为HONOR/荣耀 荣耀10GT游戏全面屏全网通双卡双待手机官方旗舰店9青春v10购机赢8X </p>
                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>2199</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>12905</span>
                                </p>
                            </div>
                        </li>
                        <li>
                            <div class="i-pic limit">

                                <img src="../picture/5.jpg"/>
                                <p class="title fl">小米 6X 前后2000万，自拍更美， 骁龙660 AIE处理器 </p>
                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>999</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>2310</span>
                                </p>
                            </div>
                        </li>
                        <li>
                            <div class="i-pic limit">

                                <img src="../picture/6.jpg"/>
                                <p class="title fl">小米 黑鲨游戏手机 全面屏超宽视野， 独立图像处理芯片， 震撼Biso音效</p>
                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>2699</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>2145</span>
                                </p>
                            </div>
                        </li>
                        <li>
                            <div class="i-pic limit">

                                <img src="../picture/7.jpg"/>
                                <p class="title fl">Xiaomi/小米 小米8 青春版全面屏智能拍照游戏手机学生机商务机 官方旗舰店正品 X</p>
                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>1388</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>8110</span>
                                </p>
                            </div>
                        </li>
                        <li>
                            <div class="i-pic limit">

                                <img src="../picture/8.jpg"/>
                                <p class="title fl">【享6期免息】Huawei/华为 Mate 20 全面屏珍珠屏超大广角徕卡三镜头旗舰官方正品智能手机mate20x</p>
                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>3999</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>6458</span>
                                </p>

                            </div>
                        </li>
                        <li>
                            <div class="i-pic limit">
                                <img src="../picture/9.jpg"/>
                                <p class="title fl">【下单立减200享6期免息】Huawei/华为 P20 全面屏刘海屏徕卡双摄麒麟970芯片官方正品旗舰智能手机</p>
                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>3388</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>4510</span>
                                </p>
                            </div>
                        </li>
                        <li>
                            <div class="i-pic limit">
                                <img src="../picture/10.jpg"/>
                                <p class="title fl">Sony/索尼 G8142 Xperia XZ Premium 4k 双卡双待4G拍照xzp手机</p>
                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>3799</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>1324</span>
                                </p>
                            </div>
                        </li>
                        <li>
                            <div class="i-pic limit">


                                <img src="../picture/11.jpg"/>
                                <p class="title fl">现货Samsung/三星 GALAXY S9 s9+ plus 港版港行全网通4G手机</p>

                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>2558</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>1981</span>
                                </p>
                            </div>
                        </li>
                        <li>
                            <div class="i-pic limit">

                                <img src="../picture/12.jpg"/>
                                <p class="title fl">【新品享6期免息赠礼】vivo X23幻彩版水滴全面屏拍照超大广角智能4G限量版手机官方旗舰店正品vivox23 X21</p>
                                <p class="price fl">
                                    <b>¥</b>
                                    <strong>2798</strong>
                                </p>
                                <p class="number fl">
                                    销量<span>4924</span>
                                </p>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="search-side">

                    <div class="side-title">
                        掌柜热卖
                    </div>

                    <li>
                        <div class="i-pic limit">
                            <img src="../picture/13.jpg"/>
                            <p class="check-title">Apple/苹果 iPhoneXS苹果xs Max苹果X国行未激活正品手机</p>
                            <p class="price fl">
                                <b>¥</b>
                                <strong>6580</strong>
                            </p>
                            <p class="number fl">
                                销量<span>3460</span>
                            </p>
                        </div>
                    </li>
                    <li>
                        <div class="i-pic limit">
                            <img src="../picture/14.jpg"/>
                            <p class="check-title">vivo NEX 旗舰版全面屏8G大运存屏幕指纹全网通官方旗舰店全新智能正品手机vivonex</p>
                            <p class="price fl">
                                <b>¥</b>
                                <strong>4298</strong>
                            </p>
                            <p class="number fl">
                                销量<span>2390</span>
                            </p>
                        </div>
                    </li>
                    <li>
                        <div class="i-pic limit">
                            <img src="../picture/15.jpg"/>
                            <p class="check-title">Xiaomi/小米 小米8 青春版全面屏智能拍照游戏手机学生机商务机 官方旗舰店正品 X</p>
                            <p class="price fl">
                                <b>¥</b>
                                <strong>1399</strong>
                            </p>
                            <p class="number fl">
                                销量<span>1316</span>
                            </p>
                        </div>
                    </li>

                </div>


                <div class="clear"></div>
                <!--分页 -->
                <ul class="am-pagination am-pagination-right sku-page">
                    <li class="am-disabled"><a href="javascript:void(0)" data-page="-1">&laquo;</a></li>
                    <li class="am-active"><a href="javascript:void(0)" data-page="1">1</a></li>
                    <li><a href="javascript:void(0)" data-page="2">2</a></li>
                    <li><a href="javascript:void(0)" data-page="3">3</a></li>
                    <li><a href="javascript:void(0)" data-page="4">4</a></li>
                    <li><a href="javascript:void(0)" data-page="5">5</a></li>
                    <li><a href="javascript:void(0)" data-page="-2">&raquo;</a></li>
                </ul>

            </div>
        </div>
        <div class="footer">
            <div class="footer-hd">
                <p>
                    <a href="#">手机租赁之家</a>
                    <b>|</b>
                    <a href="#">商城首页</a>
                    <b>|</b>
                    <a href="#">支付宝</a>
                    <b>|</b>
                    <a href="#">物流</a>
                </p>
            </div>
            <div class="footer-bd">
                <p>
                    <a href="#">关于我们</a>
                    <a href="#">合作伙伴</a>
                    <a href="#">联系我们</a>
                    <a href="#">网站地图</a>
                    <em>© 2015-2025 Hengwang.com 版权所有 <a href="home.html" target="_blank" title="手机租赁之家">手机租赁之家</a> -
                        Collect from <a href="home.html" title="手机租赁之家" target="_blank">手机租赁之家</a></em>
                </p>
            </div>
        </div>
    </div>

</div>

<!--引导 -->
<div class="navCir">
    <li><a href="home.html"><i class="am-icon-home "></i>首页</a></li>
    <li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
    <li><a href="shopcart.html"><i class="am-icon-shopping-basket"></i>购物车</a></li>
    <li><a href="../person/index.html"><i class="am-icon-user"></i>我的</a></li>
</div>

<!--菜单 -->
<div class=tip>
    <div id="sidebar">
        <div id="wrap">
            <div id="prof" class="item">
                <a href="#">
                    <span class="setting"></span>
                </a>
                <div class="ibar_login_box status_login">
                    <div class="avatar_box">
                        <p class="avatar_imgbox"><img class="nick-avatar" src="../images/no-img_mid_.jpg"/></p>
                        <ul class="user_info">
                            <li class="nick-name">用户名：sl1903</li>
                            <li>级&nbsp;别：普通会员</li>
                        </ul>
                    </div>
                    <div class="login_btnbox">
                        <a href="#" class="login_order">我的订单</a>
                        <a href="#" class="login_favorite">我的收藏</a>
                    </div>
                    <i class="icon_arrow_white"></i>
                </div>

            </div>
            <div id="shopCart" class="item">
                <a href="#">
                    <span class="message"></span>
                </a>
                <p>
                    购物车
                </p>
                <p class="cart_num">0</p>
            </div>
            <div id="asset" class="item">
                <a href="#">
                    <span class="view"></span>
                </a>
                <div class="mp_tooltip">
                    我的资产
                    <i class="icon_arrow_right_black"></i>
                </div>
            </div>

            <div id="foot" class="item">
                <a href="#">
                    <span class="zuji"></span>
                </a>
                <div class="mp_tooltip">
                    我的足迹
                    <i class="icon_arrow_right_black"></i>
                </div>
            </div>

            <div id="brand" class="item">
                <a href="#">
                    <span class="wdsc"><img src="../images/wdsc.png"/></span>
                </a>
                <div class="mp_tooltip">
                    我的收藏
                    <i class="icon_arrow_right_black"></i>
                </div>
            </div>

            <div id="broadcast" class="item">
                <a href="#">
                    <span class="chongzhi"><img src="../images/chongzhi.png"/></span>
                </a>
                <div class="mp_tooltip">
                    我要充值
                    <i class="icon_arrow_right_black"></i>
                </div>
            </div>

            <div class="quick_toggle">
                <li class="qtitem">
                    <a href="#"><span class="kfzx"></span></a>
                    <div class="mp_tooltip">客服中心<i class="icon_arrow_right_black"></i></div>
                </li>
                <!--二维码 -->
                <li class="qtitem">
                    <a href="#none"><span class="mpbtn_qrcode"></span></a>
                    <div class="mp_qrcode" style="display:none;"><img src="../images/weixin_code_145.png"/><i
                            class="icon_arrow_white"></i></div>
                </li>
                <li class="qtitem">
                    <a href="#top" class="return_top"><span class="top"></span></a>
                </li>
            </div>

            <!--回到顶部 -->
            <div id="quick_links_pop" class="quick_links_pop hide"></div>

        </div>

    </div>
    <div id="prof-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>
            我
        </div>
    </div>
    <div id="shopCart-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>
            购物车
        </div>
    </div>
    <div id="asset-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>
            资产
        </div>

        <div class="ia-head-list">
            <a href="#" target="_blank" class="pl">
                <div class="num">0</div>
                <div class="text">优惠券</div>
            </a>
            <a href="#" target="_blank" class="pl">
                <div class="num">0</div>
                <div class="text">红包</div>
            </a>
            <a href="#" target="_blank" class="pl money">
                <div class="num">￥0</div>
                <div class="text">余额</div>
            </a>
        </div>

    </div>
    <div id="foot-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>
            足迹
        </div>
    </div>
    <div id="brand-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>
            收藏
        </div>
    </div>
    <div id="broadcast-content" class="nav-content">
        <div class="nav-con-close">
            <i class="am-icon-angle-right am-icon-fw"></i>
        </div>
        <div>
            充值
        </div>
    </div>
</div>

<div class="theme-popover-mask"></div>
<script type="text/javascript" src="../basic/js/quick_links.js"></script>

<script type="text/javascript" src="../../plugins/global.js"></script>
<script type="text/javascript">
    +function ($) {

        $(function () {
            var user = storage.get('login_user');
            if (user) {
                var $login = $('.login-user');
                $login.find('.login-info').hide();
                var $user = $login.find('.user-data');
                $('.nick-name').text(user.nickName);
                $('.nick-avatar').attr('src', user.avatarUrl);
                $user.show();

                $('.logout-btn').click(function () {
                    request.post({
                        url: 'api/user/logout',
                        success: function (res) {
                            if (res.success) {
                                $.tip.success('注销成功');
                                storage.remove('login_user');
                                window.location.href = '/app/home/login.html';
                            } else {
                                storage.remove('login_user');
                                window.location.href = '/app/home/login.html';
                            }
                        }
                    })
                });
            }

            var renderWareList = function (data) {
                var $sku = $('.sku-list');
                $sku.empty();
                var wareHtml = '';
                console.log(data);
                for (var i = 0; i < data.wareList.wareList.length; i++) {
                    var ware = data.wareList.wareList[i];
                    wareHtml += (
                        '<li data-id="' + ware.wareId + '">' +
                        '    <div class="i-pic limit">' +
                        '        <img width="218" alt="" src="' + ware.imageurl + '"/>' +
                        '        <p class="title fl">' + ware.wname + '</p>' +
                        '        <p class="price fl">' +
                        '            <b>¥</b>' +
                        '            <strong>' + ware.jdPrice + '</strong>' +
                        '        </p>' +
                        '        <p class="number fl">' +
                        '            评论数 <span>' + ware.totalCount + '</span>' +
                        '        </p>' +
                        '    </div>' +
                        '</li>'
                    )
                }
                $sku.append(wareHtml);
                $sku.find('li').on('click', function () {
                    var id = $(this).data('id');
                    window.location.href = '/app/home/introduction.html?skuId=' + id;
                });
                $('.sku-page li').removeClass('am-active');
                if (_page === 1) {
                    $('.sku-page li:first').addClass('am-disabled');
                } else {
                    $('.sku-page li:first').removeClass('am-disabled');
                }
                $('.ware-count').text(data.wareList.wareCount);
                $('.sku-page li [data-page="' + _page + '"]').parent().addClass('am-active');
            };

            var search = function (k, page, sort) {
                if (page <= 0) {
                    page = 1;
                }
                _page = page;
                var $sku = $('.sku-list');
                $sku.empty();
                request.post({
                    url: 'api/shop/search',
                    data: {
                        keyword: k,
                        page: page,
                        sort: sort
                    },
                    callback: function (data) {
                        renderWareList(data);
                    }
                })
            };

            var keyword = request.getParam(window.location.search, 'keyword');
            var _sort = null;
            var _page = 1;
            if (keyword) {
                keyword = decodeURI(keyword);
                $('.sku-search-input').val(keyword);
                search(keyword, 1);
            }

            $('.sku-search-btn').click(function () {
                var $skuInput = $('.sku-search-input');
                var key = $skuInput.val();
                if (key === '') {
                    key = $skuInput.attr('placeholder');
                    $skuInput.val(key);
                }
                if (_sort) {
                    search(key, 1, _sort);
                } else {
                    search(key, 1);
                }

            });

            $('.sku-sort').click(function () {
                var sort = $(this).data('sort');
                _sort = sort;
                var key = $('.sku-search-input').val();
                if (key === '') {
                    key = keyword;
                }
                $('.sku-sort-list li').removeClass('first');
                $(this).parent().addClass('first');
                search(key, 1, sort);
            });

            $('.sku-sort-none').click(function () {
                var key = $('.sku-search-input').val();
                _sort = null;
                if (key === '') {
                    key = keyword;
                }
                $('.sku-sort-list li').removeClass('first');
                $(this).parent().addClass('first');
                search(key, 1);
            });

            $('.sku-page li a').click(function () {
                var page = $(this).data('page');
                var key = $('.sku-search-input').val();
                if (key === '') {
                    key = keyword;
                }
                console.log(typeof page, page);
                if (page === -1) {
                    _page = _page - 1;
                } else if (page === -2) {
                    _page = _page + 1;
                } else {
                    _page = parseInt(page);
                }
                if (_sort) {
                    search(key, _page, _sort);
                } else {
                    search(key, _page);
                }

            });


        });

    }(jQuery);

</script>
</body>

</html>